const mongoose = require('mongoose');
mongoose.connect('mongodb://localhost/playground')
.then(()=>{
    console.log("链接数据库成功");
}).catch((err)=>{
    console.log("连接失败: "+err);
})